package com.woorigil.social.domain.history;

import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.woorigil.social.domain.SqlMapDaoSupport;

@Repository
public class WorkHistoryDao extends SqlMapDaoSupport<WorkHistory, Integer> {
	public static final String NAMESPACE = "WorkHistory";

	@Override
	public String getNamespace() {
		return NAMESPACE;
	}

	public WorkHistory selectLastWorkDate(String name) {
		Map<String, Object> params = new HashMap<String, Object>();
		params.put("name", name);
		return (WorkHistory)getSqlMapClientTemplate().queryForObject(getStatementName(NAMESPACE, "selectLastWorkDate"), params);
	}
}